<script setup lang="ts">
// import { ref } from 'vue'
// import { ProtectType } from './types'
import { useLocalStorage } from '@vueuse/core'
import { useModels } from './composables/useModels'
import ProjectTable from './widgets/ProjectsTable.vue'
// import EditProjectForm from './widgets/EditProjectForm.vue'
// import { Model } from './types'
// import { useModal, useToast } from 'vuestic-ui'

const doShowAsCards = useLocalStorage('models-view', true)

const { models, isLoading, pagination, sorting } = useModels() // update, remove
// 项目列表，更新，添加，是否转圈，删除，分页指示，排序数据（依据，list）
</script>

<template>
  <VaCard>
    <VaCardContent>
      <ProjectTable
        v-model:sort-by="sorting.sortBy"
        v-model:sorting-order="sorting.sortingOrder"
        v-model:pagination="pagination"
        :models="models"
        :loading="isLoading"
      />
    </VaCardContent>
  </VaCard>
</template>
